package com.funcas.pcloud.upms.facade;

import com.funcas.pcloud.common.ApiResult;
import com.funcas.pcloud.upms.entity.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.websocket.server.PathParam;

/**
 * @author funcas
 * @version 1.0
 * @date 2018年10月14日
 */
public interface ResourceRestFacade {

    @RequestMapping(value = "/resources", method = RequestMethod.GET)
    public ApiResult getUserResources();

    @RequestMapping(value = "/resource/{id}", method = RequestMethod.GET)
    public ApiResult edit(@PathParam("id") Long id);

    @RequestMapping(value = "/resource", method = RequestMethod.POST)
    public ApiResult save(Resource entity);

    @RequestMapping(value = "/resource/{id}", method = RequestMethod.DELETE)
    public ApiResult delete(@PathParam("id") Long id);
}
